﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics.Eventing.Reader;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;


namespace MyGame
{
    /// <summary>
    /// 维吉尼亚密码加密
    /// </summary>
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
            //添加背景
            this.BackgroundImage=Image.FromFile("D:\\ppt\\backgroud.jpg");
        }

        private void frmMain_Load(object sender, EventArgs e)
        {

        }
        

        private void button1_Click(object sender, EventArgs e)
        {
            string input = textBox1.Text;
            string key = textBox2.Text;
            //加密
            MyCoder myEncoder = new MyCoder();
            myEncoder.PlainText=input;
            myEncoder.Key=key;
            myEncoder.Ecode();
            textBox3.Text=myEncoder.CipherText;
        }

        private void label4_Click(object sender, EventArgs e)
        {

        }

        private void textBox3_TextChanged(object sender, EventArgs e)
        {
            
        }

        private void label2_Click(object sender, EventArgs e)
        {

        }
    }
}
